package com.fate.framework.validate;

import com.fate.framework.annotation.CheckPhone;
import com.fate.framework.utils.MobileUtil;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;

public class CheckPhoneValidate implements ConstraintValidator<CheckPhone, String> {
  @Override
  public boolean isValid(String s, ConstraintValidatorContext constraintValidatorContext) {
    return MobileUtil.checkPhone(s);
  }
}
